<?php

class Application_Form_Firma extends Zend_Form {

    public function init() {
        $this->setMethod('post');
        $this->setAction('/index/dodaj');
        $this->addElement('text', 'nazwa', array(
            'label' => 'Nazwa firmy:',
            'required' => true
        ));
        $this->addElement('text', 'miasto', array(
            'label' => 'Miasto:',
            'required' => true
        ));
        $this->addElement('text', 'postcode', array(
            'label' => 'Kod pocztowy:',
            'required' => true
        ));
        $this->addElement('text', 'ulica', array(
            'label' => 'Ulica:',
            'required' => true
        ));
        $this->addElement('text', 'telefon', array(
            'label' => 'Telefon:',
            'required' => false
        ));
        $this->addElement('text', 'email', array(
            'label' => 'Email:',
            'required' => true,
            'filters' => array('StringTrim'),
            'validators' => array(
                'EmailAddress',
            )
        ));
        $this->addElement('text', 'www', array(
            'label' => 'Strona WWW:',
            'required' => false
        ));
        $this->addElement('captcha', 'captcha', array(
            'label' => 'Potwierdź autentyczność:',
            'required' => true,
            'captcha' => array(
                'captcha' => 'ReCaptcha',
                'privKey' => '6LeKx7sSAAAAAAeJCkcmBFujuzztBmqaoLjFtYUt',
                'pubKey' => '6LeKx7sSAAAAAHTd_3T13KOvHZgtygNUOax1H5E6'
            )
        ));

        $this->addElement('hidden', 'id');

        $this->addElement('submit', 'dodaj');
    }

}